import { GTabBar } from "../../../../com/mui/controls/GTabBar";
import { GBoxDirection } from "../../../../com/mui/containers/globalVariable/GBoxDirection";
import { EventName } from "../../mvc/EventName";
import { GButton } from "../../../../com/mui/controls/GButton";
type int = number;
//class GRankTabBar
    
    export  class GRankTabBar extends GTabBar
    {
        constructor()
        {
            super();
            return;
        }

        public resetButtonPos(arg1: int, arg2: int): void
        {
            var loc1=0;
            var loc4=null;
            var loc2=0;
            var loc3=this.numChildren;
            if (this.direction == GBoxDirection.VERTICAL) 
            {
                loc1 = 0;
                while (loc1 < loc3) 
                {
                    (loc4 = this.getChildAt(loc1)).x = 0;
                    loc4.y = loc2 + verticalGap;
                    if (loc1 != arg1) 
                    {
                        loc2 = loc4.y + loc4.height;
                    }
                    else 
                    {
                        loc2 = loc4.y + loc4.height + arg2;
                    }
                    ++loc1;
                }
            }
            return;
        }

        protected /* override */ updateDisplayList(): void
        {
            super.updateDisplayList();
            this.dispatchEvent(new Object /* flash.events.Event */(EventName.RankBarInitEnd));
            return;
        }

        public getFirstBlankPos(): Object /* flash.geom.Point */
        {
            var loc1=getChildAt(selectedIndex) as GButton;
            var loc2=loc1.x;
            var loc3=loc1.y + loc1.height;
            return new Object /* flash.geom.Point */(loc2, loc3);
        }
    }
